import './App.css';
import { useSelector, useDispatch } from 'react-redux';
import { fetchChannelList } from './store/modules/channelStore'
import { useEffect } from 'react';

function App() {
  const {channelList} = useSelector(state => state.channel)
  const dispatch = useDispatch()
  useEffect(() => {
    dispatch(fetchChannelList())
  }, [dispatch])
  return (
    <div>
      <ul>
        {channelList.map(item => (
          <li key={item.id}>{item.name}</li>
        ))}
      </ul>
    </div>
  );
}

export default App;
